﻿namespace StoreSystem.Models
{
    public class StoreInfo
    {
        public int StoreNO { get; set; }
        public string StoreName { get; set; }
        public byte SlaveID { get; set; }

        public List<StoreRoomInfo> Rooms { get; set; } = new List<StoreRoomInfo>();
        public AlarmSetInfo AlarmSet { get; set; } = new AlarmSetInfo();

        public void UpdateRoomState()
        {
            Rooms.ForEach(r => r.UpdateState(AlarmSet));
        }
    }
}